#! /usr/bin/env python
# -*- coding: utf-8 -*-

import CashSuper


class CashReturn(CashSuper.CashSuper):

    def __init__(self, total=0, ret=0):
        self.total = total
        self.ret = ret

    def AcceptCash(self, money):
        if money >= self.total:
            return money - self.ret
        else:
            return money
